import csv
import  pandas as pd
import numpy as np 
df=pd.read_csv("mobike.csv")
pd.DataFrame(np.random.rand(100,10))
df.columns = ['a','b','c','d','e','f','g','h','i','j']
df['time'] = pd.to_datetime(df['g']) - pd.to_datetime(df['d'])
print(df['time'])
row=df['time']
out = open("time.csv", "a", newline = "")
csv_writer = csv.writer(out, dialect = "excel")
csv_writer.writerow(row)